#ifndef MFS_DB_H
#define MFS_DB_H

#include <vector>
#include <string.h>
#include "mfs_alloc.h"

using namespace std;

typedef struct {
	int id;
	char *name;
	char *artist;
	char *album;
	char *real_path;
} mfs_song;

typedef struct {
	int id;
	char *name;
} mfs_artist;

typedef struct {
	int id;
	char *name;
	char *artist;
} mfs_album;


typedef struct {
	int id;
	char *nume;
} mfs_playlist;

/*
typedef struct {
	int id;
	char *song;
	char *artist;
	char *real_name;
} mfs_videoclip;
*/

typedef struct {
	int id;
	char *name;
	char *real_path;
} mfs_movie;

typedef struct {
	int id;
	char *name;
	char *real_path;
} mfs_picture;

// songs
typedef mfs_song_list vector<song>*;
mfs_song_list song_list_create ();
bool song_list_add (const mfs_song_list &song_list, const song &s);
void delete_song_list (mfs_song_list &song_list);

// albums
typedef mfs_album_list vector<album>*;
mfs_album_list album_list_create ();
bool album_list_add (const mfs_album_list &album_list, const album &a);
void delete_album_list (mfs_album_list &album_list);

// artists
typedef mfs_artist_list vector<artist>*;
mfs_artist_list artist_list_create ();
bool artist_list_add (const mfs_artist_list &artist_list, const artist &a);
void delete_artist_list (mfs_artist_list &artist_list);

// playlists
typedef mfs_playlist_list vector<playlist>*;
mfs_playlist_list playlist_list_create ();
bool playlist_list_add (const mfs_playlist_list &playlist_list, const playlist &p);
void delete_playlist_list (mfs_playlist_list &playlist_list);

// movies
typedef mfs_movie_list vector<movie>*;
mfs_movie_list movie_list_create ();
bool movie_list_add (const mfs_movie_list &movie_list, const movie &m);
void delete_movie_list (mfs_movie_list &movie_list);

// videoclips
typedef mfs_videoclip_list vector<videoclip>*;
mfs_videoclip_list videoclip_list_create ();
bool videoclip_list_add (const mfs_videoclip_list &videoclip_list, const videoclip &v);
void delete_videoclip_list (mfs_videoclip_list &videoclip_list);

// pictures
typedef mfs_picture_list vector<picture>*;
mfs_picture_list picture_list_create ();
bool picture_list_add (const mfs_picture_list &picture_list, const picture &p);
void delete_picture_list (mfs_picture_list &picture_list);


// list songs
mfs_song_list list_songs_by_artist (const char *artist_name);
mfs_song_list list_songs_by_artist_id (int aid);
mfs_song_list list_songs_by_album (const char *album_name);
mfs_song_list list_songs_by_album_id (int aid);
mfs_song_list list_songs_all ();

// list albums
mfs_album_list list_albums_by_artist (const char *artist_name);
mfs_album_list list_albums_by_artist_id (int aid);
mfs_album_list list_albums_by_year (int year);
mfs_album_list list_albums_all ();

// list artists from mfs directory path
mfs_artist_list list_artists_all ();

// list playlists from mfs directory path
mfs_playlist_list list_playlists_all ();

// list movies from mfs directory path
mfs_movie_list list_movies_all ();

/*
// list videoclips from mfs directory path
mfs_videoclip_list list_videoclips_all (const char *path);
*/

// list pictures from mfs directory path
mfs_picture_list list_pictures_all ();

#endif
